<!-- 入会配置 -->
<template>
  <a-card
    style="width: 100%"
    :tab-list="tabListNoTitle"
    :active-tab-key="titleKey"
    @tabChange="(key) => onTabChange(key)"
    :bordered="false"
    class="br-10"
  >
    <div v-if="titleKey === 'richText'">
      <RichText :type="memberType" />
    </div>
    <div v-else-if="titleKey === 'form'">
      <FormConfig :type="memberType" />
    </div>
    <div v-else-if="titleKey === 'payment'">
      <Payment />
    </div>
  </a-card>
</template>

<script>
import RichText from './components/richText/index.vue'
import FormConfig from './components/formConfig/index.vue'
import Payment from './components/payment/index.vue'
export default {
  components: {
    RichText,
    FormConfig,
    Payment,
  },
  data() {
    return {
      tabListNoTitle: [
        {
          key: 'richText',
          tab: '申请须知配置',
        },
        {
          key: 'form',
          tab: '申请表单配置',
        },
        {
          key: 'payment',
          tab: '缴费函配置',
        },
      ],
      titleKey: 'richText',
      memberType: 1,
    }
  },
  computed: {},
  watch: {

  },
  methods: {
    onTabChange(key) {
      this.titleKey = key
    },
  },
  created() {
    this.memberType = this.$route.query.type
  },
  mounted() {
    this.$route.meta.title = this.$route.query.type == 1 ? '单位申请配置' : '个人申请配置';
  },
}
</script>
<style scoped>
</style>